﻿Public Class clsLoja
    Inherits clsConexao
    Private fCondicao As String = ""
    Private fMatriz As Byte, fInativo As Byte, fConexao As Byte, fVnc As Byte, fBase As Byte, fRelatorio As Byte
    Private fNome As String = "", fTelefone As String = "", fTelefone2 As String = "", fEmail As String = "", fGerente As String = "", fObs As String = "", fEmail_Copia As String = "", fRua As String = "", fBairro As String = "", fUf As String = "", fSo As String = "", fMunicipio As String = "", fCep As String = "", fMsn As String = "", fSkype As String = "", fU_Cadastro As String = "", fU_Alteracao As String = "", fDias As String = "", fFilial As String = "", fNome2 As String = "", fCgc As String = "", fBairro2 As String = "", fMunicipio2 As String = ""
    Private fCodigo As Integer, fCliente As Integer, fShopping As Integer, fFechamento As Integer
    Private fInstalacao As Date, fAtualizacao As Date, fD_Cadastro As Date, fD_Alteracao As Date
    Public Property Codigo() As Integer
        Get
            Return fCodigo
        End Get
        Set(ByVal value As Integer)
            fCodigo = value
        End Set
    End Property
    Public Property Cliente() As Integer
        Get
            Return fCliente
        End Get
        Set(ByVal value As Integer)
            fCliente = value
        End Set
    End Property
    Public Property Nome() As String
        Get
            Return fNome
        End Get
        Set(ByVal value As String)
            fNome = value
        End Set
    End Property
    Public Property Telefone() As String
        Get
            Return fTelefone
        End Get
        Set(ByVal value As String)
            fTelefone = value
        End Set
    End Property
    Public Property Telefone2() As String
        Get
            Return fTelefone2
        End Get
        Set(ByVal value As String)
            fTelefone2 = value
        End Set
    End Property
    Public Property Email() As String
        Get
            Return fEmail
        End Get
        Set(ByVal value As String)
            fEmail = value
        End Set
    End Property
    Public Property Instalacao() As Date
        Get
            Return fInstalacao
        End Get
        Set(ByVal value As Date)
            fInstalacao = value
        End Set
    End Property
    Public Property Atualizacao() As Date
        Get
            Return fAtualizacao
        End Get
        Set(ByVal value As Date)
            fAtualizacao = value
        End Set
    End Property
    Public Property Gerente() As String
        Get
            Return fGerente
        End Get
        Set(ByVal value As String)
            fGerente = value
        End Set
    End Property
    Public Property Matriz() As Byte
        Get
            Return fMatriz
        End Get
        Set(ByVal value As Byte)
            fMatriz = value
        End Set
    End Property
    Public Property Inativo() As Byte
        Get
            Return fInativo
        End Get
        Set(ByVal value As Byte)
            fInativo = value
        End Set
    End Property
    Public Property Obs() As String
        Get
            Return fObs
        End Get
        Set(ByVal value As String)
            fObs = value
        End Set
    End Property
    Public Property Email_Copia() As String
        Get
            Return fEmail_Copia
        End Get
        Set(ByVal value As String)
            fEmail_Copia = value
        End Set
    End Property
    Public Property Rua() As String
        Get
            Return fRua
        End Get
        Set(ByVal value As String)
            fRua = value
        End Set
    End Property
    Public Property Bairro() As String
        Get
            Return fBairro
        End Get
        Set(ByVal value As String)
            fBairro = value
        End Set
    End Property
    Public Property Uf() As String
        Get
            Return fUf
        End Get
        Set(ByVal value As String)
            fUf = value
        End Set
    End Property
    Public Property So() As String
        Get
            Return fSo
        End Get
        Set(ByVal value As String)
            fSo = value
        End Set
    End Property
    Public Property Municipio() As String
        Get
            Return fMunicipio
        End Get
        Set(ByVal value As String)
            fMunicipio = value
        End Set
    End Property
    Public Property Cep() As String
        Get
            Return fCep
        End Get
        Set(ByVal value As String)
            fCep = value
        End Set
    End Property
    Public Property Conexao() As Byte
        Get
            Return fConexao
        End Get
        Set(ByVal value As Byte)
            fConexao = value
        End Set
    End Property
    Public Property Vnc() As Byte
        Get
            Return fVnc
        End Get
        Set(ByVal value As Byte)
            fVnc = value
        End Set
    End Property
    Public Property Msn() As String
        Get
            Return fMsn
        End Get
        Set(ByVal value As String)
            fMsn = value
        End Set
    End Property
    Public Property Skype() As String
        Get
            Return fSkype
        End Get
        Set(ByVal value As String)
            fSkype = value
        End Set
    End Property
    Public Property D_Cadastro() As Date
        Get
            Return fD_Cadastro
        End Get
        Set(ByVal value As Date)
            fD_Cadastro = value
        End Set
    End Property
    Public Property U_Cadastro() As String
        Get
            Return fU_Cadastro
        End Get
        Set(ByVal value As String)
            fU_Cadastro = value
        End Set
    End Property
    Public Property D_Alteracao() As Date
        Get
            Return fD_Alteracao
        End Get
        Set(ByVal value As Date)
            fD_Alteracao = value
        End Set
    End Property
    Public Property U_Alteracao() As String
        Get
            Return fU_Alteracao
        End Get
        Set(ByVal value As String)
            fU_Alteracao = value
        End Set
    End Property
    Public Property Base() As Byte
        Get
            Return fBase
        End Get
        Set(ByVal value As Byte)
            fBase = value
        End Set
    End Property
    Public Property Relatorio() As Byte
        Get
            Return fRelatorio
        End Get
        Set(ByVal value As Byte)
            fRelatorio = value
        End Set
    End Property
    Public Property Shopping() As Integer
        Get
            Return fShopping
        End Get
        Set(ByVal value As Integer)
            fShopping = value
        End Set
    End Property
    Public Property Fechamento() As Integer
        Get
            Return fFechamento
        End Get
        Set(ByVal value As Integer)
            fFechamento = value
        End Set
    End Property
    Public Property Dias() As String
        Get
            Return fDias
        End Get
        Set(ByVal value As String)
            fDias = value
        End Set
    End Property
    Public Property Filial() As String
        Get
            Return fFilial
        End Get
        Set(ByVal value As String)
            fFilial = value
        End Set
    End Property
    Public Property Nome2() As String
        Get
            Return fNome2
        End Get
        Set(ByVal value As String)
            fNome2 = value
        End Set
    End Property
    Public Property Cgc() As String
        Get
            Return fCgc
        End Get
        Set(ByVal value As String)
            fCgc = value
        End Set
    End Property
    Public Property Bairro2() As String
        Get
            Return fBairro2
        End Get
        Set(ByVal value As String)
            fBairro2 = value
        End Set
    End Property
    Public Property Municipio2() As String
        Get
            Return fMunicipio2
        End Get
        Set(ByVal value As String)
            fMunicipio2 = value
        End Set
    End Property
    Private Sub clsFilial_ListaCampo(ByVal ParAcao As enuTConexao, ByRef parErro As Boolean) Handles Me.ListaCampo
        fNomeTabela = "LOJAS"
        AlimentaCampo("LOJ_CODIGO", fCodigo, True)
        AlimentaCampo("LOJ_CLIENTE", fCliente, False)
        AlimentaCampo("LOJ_NOME", fNome, False)
        AlimentaCampo("LOJ_TELEFONE", fTelefone, False)
        AlimentaCampo("LOJ_TELEFONE2", fTelefone2, False)
        AlimentaCampo("LOJ_EMAIL", fEmail, False)
        AlimentaCampo("LOJ_INSTALACAO", fInstalacao, False)
        AlimentaCampo("LOJ_ATUALIZACAO", fAtualizacao, False)
        AlimentaCampo("LOJ_GERENTE", fGerente, False)
        AlimentaCampo("LOJ_MATRIZ", fMatriz, False)
        AlimentaCampo("LOJ_INATIVO", fInativo, False)
        AlimentaCampo("LOJ_OBS", fObs, False)
        AlimentaCampo("LOJ_EMAIL_COPIA", fEmail_Copia, False)
        AlimentaCampo("LOJ_RUA", fRua, False)
        AlimentaCampo("LOJ_BAIRRO", fBairro, False)
        AlimentaCampo("LOJ_UF", fUf, False)
        AlimentaCampo("LOJ_SO", fSo, False)
        AlimentaCampo("LOJ_MUNICIPIO", fMunicipio, False)
        AlimentaCampo("LOJ_CEP", fCep, False)
        AlimentaCampo("LOJ_CONEXAO", fConexao, False)
        AlimentaCampo("LOJ_VNC", fVnc, False)
        AlimentaCampo("LOJ_MSN", fMsn, False)
        AlimentaCampo("LOJ_SKYPE", fSkype, False)
        AlimentaCampo("LOJ_D_CADASTRO", fD_Cadastro, False)
        AlimentaCampo("LOJ_U_CADASTRO", fU_Cadastro, False)
        AlimentaCampo("LOJ_D_ALTERACAO", fD_Alteracao, False)
        AlimentaCampo("LOJ_U_ALTERACAO", fU_Alteracao, False)
        AlimentaCampo("LOJ_BASE", fBase, False)
        AlimentaCampo("LOJ_RELATORIO", fRelatorio, False)
        AlimentaCampo("LOJ_SHOPPING", fShopping, False)
        AlimentaCampo("LOJ_FECHAMENTO", fFechamento, False)
        AlimentaCampo("LOJ_DIAS", fDias, False)
        AlimentaCampo("LOJ_FILIAL", fFilial, False)
        AlimentaCampo("LOJ_NOME2", fNome2, False)
        AlimentaCampo("LOJ_CGC", fCgc, False)
        AlimentaCampo("LOJ_BAIRRO2", fBairro2, False)
        AlimentaCampo("LOJ_MUNICIPIO2", fMunicipio2, False)
        If fCondicao <> "" Then CondicaoSql = fCondicao
    End Sub

End Class
